fix(minor): [sc-32833] Add possibility to construct Consul instance with address string.#33
Conversation
…ith address string.
There was a problem hiding this comment.
Code Review
This pull request introduces new initializers and address parsing logic to the Consul client, allowing initialization via a single address string (e.g., "host:port") alongside new error cases for invalid inputs. It also adds corresponding unit tests for the parsing logic. The review feedback highlights critical issues with IPv6 address parsing, specifically handling raw IPv6 addresses without a port and stripping brackets from bracketed IPv6 hosts to prevent connection failures in SwiftNIO. It also suggests adding unit tests to cover these IPv6 scenarios.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
==========================================
+ Coverage 79.40% 79.44% +0.04%
==========================================
Files 5 5
Lines 830 885 +55
==========================================
+ Hits 659 703 +44
- Misses 171 182 +11
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Description
Include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Minimal checklist:
DocCcode-level documentation for any public interfaces exported by the package